<el-dialog :close-on-click-modal="false"  :close-on-press-escape="false"  class="dialogStyleBase" :title="mixinEdit_editTitle" width="500px" :visible.sync="mixinEdit_editVisible"
    :before-close="function(){mixinEdit_editBoxClose('editForm')}" append-to-body>
    <div class="dialogStyleBaseBox" v-loading="mixinEdit_loading">
        <el-form ref="editForm" :model="form" label-width="100px" label-position="left">
            <el-form-item label="角色名称" prop="name" :rules="{ required: true, message: '角色名称 不能为空'}">
                <el-input v-model="form.name" maxlength="10" show-word-limit></el-input>
            </el-form-item>

            <el-form-item label="备注" prop="remark">
                <el-input type="textarea" autosize maxlength="50" autosize="{minRows: 2,maxRows: 4}"
                    v-model="form.remark" show-word-limit></el-input>
            </el-form-item>

            <el-form-item label="选择权限" :rules="{ required: mixinEdit_editType == 'add', message: '请选择',trigger: ['blur', 'change']}">
                <el-tree 
                    :data="listCanAuthRole" 
                    node-key="id" 
                    :check-on-click-node="true" 
                    show-checkbox
                    ref="tree"
                    :default-checked-keys="form.permission_ids" 
                    @check="handleNodeClick"></el-tree>
            </el-form-item>
        </el-form>
    </div>
    <div slot="footer">
        <el-row>
            <el-col :span="12" style="text-align: left;">
                <el-button @click="mixinEdit_resetForm('editForm')">重 置</el-button>
            </el-col>
            <el-col :span="12">
                <el-button @click="mixinEdit_editBoxClose('editForm')">取 消</el-button>
                <el-button type="primary" @click="mixinEdit_editFormSubmit({model:'form',ref:'editForm'})">确
                    定</el-button>
            </el-col>
        </el-row>
    </div>
</el-dialog>